package com.shop.api.controller;

import com.shop.api.entity.User;
import com.shop.api.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping(value = "/selectUser", method = RequestMethod.POST)
    public User inserteAdmin(@RequestBody User user) {
        return userService.getUser(user);
    }
}
